package com.home.cop.employee.service.impl;

import com.home.cop.employee.mapper.SysRolePrivMapper;
import com.home.cop.employee.model.SysRolePriv;
import com.home.cop.employee.service.SysRolePrivService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysRolePrivServiceImpl implements SysRolePrivService {

    @Autowired
    private SysRolePrivMapper rolePrivMapper;

    @Override
    public void deleteRoleMenu(Integer roleId) {
        rolePrivMapper.deleteRoleMenu(roleId);
    }

    @Override
    public void insert(SysRolePriv rolePriv) {
        rolePrivMapper.insert(rolePriv);
    }

    @Override
    public Integer countRoleMenus(Integer roleId) {
        return rolePrivMapper.countRoleMenus(roleId);
    }

    @Override
    public List<Integer> getRoleMenuIds(Integer roleId) {
        return rolePrivMapper.getRoleMenuIds(roleId);
    }
}
